//this file is part of ePopup
//
//This program is free software; you can redistribute it and/or
//modify it under the terms of the GNU General Public License
//as published by the Free Software Foundation; either
//version 2 of the License, or (at your option) any later version.
//
//This program is distributed in the hope that it will be useful,
//but WITHOUT ANY WARRANTY; without even the implied warranty of
//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//GNU General Public License for more details.
//
//You should have received a copy of the GNU General Public License
//along with this program; if not, write to the Free Software
//Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#pragma once

#include <CString>
#include <string>
#include <sstream>

bool _tmakepathlimit(TCHAR *path, const TCHAR *drive, const TCHAR *dir, const TCHAR *fname, const TCHAR *ext);

int  FontPointSizeToLogUnits(int nPointSize);
bool CreatePointFont(CFont &rFont, int nPointSize, LPCTSTR lpszFaceName);
bool CreatePointFontIndirect(CFont &rFont, const LOGFONT *lpLogFont);
bool isImage(const CString & filePath);
bool isSound(const CString & filePath);
bool isVideo(const CString & filePath);
bool isWavSound(const char *p_buffer);
bool isJpegImage(const char *p_image);
bool isGifImage(const char *p_image);
bool isWmvVideo(const char *p_video);
bool isAviVideo(const char *p_video);
bool isMpegVideo(const char *p_video);
bool deleteDirectory(CString, bool suppressionDefinitive = true);
CString basename(const CString & str);
//std::string basename(const std::string & str);
bool absolutePath(const std::string & relPath, std::string & absPath);
bool absolutePath(const CString & relPath, CString & absPath);
CString comboToCString(CComboBox & combo, bool useCursor = false);
std::stringstream &operator<<(std::stringstream &logger, LPCTSTR message);
std::string MFCStringToSTLString(const CString & str);
unsigned int splitString(const std::string & _str, unsigned int maxlinelen, std::string & _res);
//unsigned long long checksum(const char *p_buff, size_t p_len);
//bool getFileExtension(const std::string & p_filename, std::string & p_extension);
//void lowercase(std::string & p_string);

//bool mktempFile(std::string & p_dest, const std::string & p_tempdir, const std::string & p_extension);
